package pathfinding.grid.astar;

import pathfinding.grid.GridLocation;

public class GridHeuristicManathan implements GridHeuristic{

	private double minValue = 1;
	
	@Override
	public double getDistance(int x, int y, GridLocation location) {
		double result = 0;
		double cons = 1.2*minValue;
		result += cons*Math.abs(x-location.getCellX());
		result += cons*Math.abs(y-location.getCellY());
		return result;
	}
	
	public void setMinValue(double value){
		minValue = value;
	}

}
